package cn.xopencode.userservice.enums;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * @Author xiaodawei
 * @since 2021/9/28
 */
public enum DeptTypeEnum implements IntArrayValuable {

    //    DEPT_TYPE0(0, "普通"),
    DEPT_TYPE1(1, "部门"),
    DEPT_TYPE2(2, "二级部门"),
    DEPT_TYPE3(4, "班组");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeptTypeEnum::getDeptType).toArray();

    /**
     * 部门类型
     */
    private final Integer deptType;
    /**
     * 描述
     */
    private final String name;

    DeptTypeEnum(Integer deptType, String name) {
        this.deptType = deptType;
        this.name = name;
    }

    public Integer getDeptType() {
        return deptType;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
